Skip to content
Greg Horn edited this page Jul 23, 2014 · 26 revisions

Lecture Optimal Control and Estimation

The aim of this self contained lecture course is to provide the participants with a working knowledge of modern control theory as it is needed for use in engineering applications, with a focus on optimal control and estimation. At the end of the course the students shall have full understanding of how to use the linear quadratic regulator (LQR), the Kalman filter, Lyapunov and Riccati Equations, dynamic programming, constrained optimal control, moving horizon estimation (MHE) and model predictive control (MPC).

Announcements

May 11, 2014

  • Exercise session location is changed to building 082, room 00-028
  • Because of bugs in the first homework, it is now due on Tuesday for this week only

July 23, 2014

Teaching Content

The focus of the course is state space control in discrete time. We start by discussing discrete time linear systems, their basic stability properties, time varying systems, linearization of nonlinear systems. We then enter optimal control, covering linear quadratic optimal control, linear quadratic regulation (LQR) control and Kalman filtering, Lyapunov and Riccati Equations, Dynamic Programming, Constrained Optimal Control, Moving Horizon Estimation (MHE) and Model Predictive Control (MPC). The course will be accompanied by weekly exercises with exercise questions and computer exercises using the environment MATLAB. In the last four weeks of the course (July), the participants will start to work, during the exercise sessions, on self chosen optimal control and estimation application projects, whose results will finally be presented to all course participants at the end of the semester.

Lecture Dates

The lecture takes place in the Summer Term 2014 at the technical faculty of the University of Freiburg in the building 101, Room 01-016.

  • Monday 10:00 to 12:00 (Room 01-016, building 101)
  • Wednesday, 16:00 to 18:00 (Room 01-016, building 101)

Exam information

The written exam and the exercises are in sum the total grade (2/3 written exam, 1/3 exercises).

Exercises

The exercises are 1/3 of the final grade. The exercise takes place every Thursday from 10:00 to 12:00 at the technical faculty of the University of Freiburg in the building 082, room 00-028

  • Exercise 1 due May 13

    There were a few bugs in the first exercise. The current version on github is correct. Changes:

    1. eq (1) should be x0(k+1) = ..., not x0(k) = ...
    2. eq (2) should be i=0...98, not i=1..98
    3. the population model code has been fixed
    4. problem 2: use alpha = 3 degrees, initial conditions px=pz=vz=0, vx=10

    You may submit homework 1 up to Tuesday at midnight because of these problems

  • Exercise 2 due May 19

  • Exercise 3 due May 26

    Important comments regarding the first exercise:

    1. Never (!!) compute a matrix inverse just to solve a linear system (unless you really need the matrix inverse for other reasons), this for both efficiency and numerical reasons. In this case, you can compute x_{LS} in different ways in MATLAB:

      • inv(A'*A)*A'*b (BAD) --> (A'*A)\A'*b (better)
      • A\b (good, because mldivide delivers a least squares solution when the system cannot be solved exactly)
      • NOTE: inv(A'*A)*A' = A^+ is the Moore-Penrose pseudoinverse of the matrix A and can be computed by MATLAB directly as pinv(A) so the numerically best way is x_{LS} = pinv(A)*b (BEST)

      All these different ways are mathematically equivalent but can provide different results when the problem is ill conditioned (which is the case here).

    2. Watch out for sign mistakes (the exercise sheet itself has been updated on this):

      • when you write min || Ax - b ||2^2 --> x{LS} = (A^T A)^{-1} A^Tb
      • or when min || Ax + b ||2^2 --> x{LS} = - (A^T A)^{-1} A^Tb
  • Exercise 4 due June 9

  • Exercise 5 due June 30

  • Exercise 6 due July 7

  • Exercise 7 due July 14

  • Exercise 8

Submitting homework

Each week a new homework is assigned on Monday. This homework is due the following Monday, and the exercise sessions are held on Thursday to help with homework and answer any outstanding questions.

Email the homework to me in a zip/tar/etc with filename exerciseX_name1(_and_name2)_extension, for example exercise1_greg_horn_and_moritz_dielh.tar.gz. Please make the subject of the email something like

[OCE Summer 2014 homework] yournames

The homework should consist of a PDF with homework answers which includes all required plots/figures. Please also submit the code used to generate the figures/answers.

If you prefer to do the homework by hand and turn in a paper copy, it's fine, but please print out the plots/figures/code. I may ask you to email me the code if I need to run it when grading it.

Script

During the semester, a very tight script is created, which can serve the subject repeat and exam preparation. The latest version can be found at this location:

Recommended books and other links